from pydantic import BaseModel, Field

class SQLTableRow(BaseModel):
    server: str = Field(..., description="TEXT")
    schema: str = Field(..., description="TEXT")
    database: str = Field(..., description="TEXT")
    table_name: str = Field(..., description="TEXT")
    table_ddl: str = Field(..., description="TEXT")

# Generate column definitions from the model
COLUMN_DEFINITIONS = [
    {"name": field, "type": SQLTableRow.model_fields[field].description}
    for field in SQLTableRow.model_fields
]